/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package grex.Graphics;

import grex.ErrorManager;
import java.beans.PropertyVetoException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.DefaultListModel;

/**
 *
 * @author RIK
 */
public class jifExperimentSummary extends javax.swing.JInternalFrame {

    /**
     * Creates new form jifExperimentSummary
     */
    private int currentExperiment =0;
    public jifExperimentSummary() {
        initComponents();
        setTitle("Experiment Summary");
        setVisible(true);
        setMaximizable(true);
    }
    
    public void addExepriments(ExperimenterTab experiment){
      DefaultListModel experiments = experiment.experiments;
        for(int i=0;i<experiments.getSize();i++){
            jtxaResults.insert("---------------Experiment:"+i+ "---------------\n" + experiments.elementAt(i).toString() +"\n",0);
        }
        jtxaResults.setCaretPosition(0);
    }
    
    public void addResult(String result){
        jtxaResults.insert("Exp"+currentExperiment +":\t" + result, 0);
        currentExperiment++;
        jtxaResults.setCaretPosition(0);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        jtxaResults = new javax.swing.JTextArea();

        setClosable(true);
        setIconifiable(true);
        setMaximizable(true);
        setResizable(true);

        jtxaResults.setColumns(20);
        jtxaResults.setRows(5);
        jScrollPane1.setViewportView(jtxaResults);

        getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);

        pack();
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTextArea jtxaResults;
    // End of variables declaration//GEN-END:variables
}
